from . import index_bl
from flask import render_template, request, redirect, url_for


@index_bl.route('/')
def home():
    return render_template('base.html')


@index_bl.route('/conndevice.html',methods=['GET', 'POST'])
def conn_device():
    if request.method == 'POST':
        address = request.form.get('address')
        rack = request.form.get('rack')
        solt = request.form.get('solt')
        print(address,rack,solt)
        return redirect(url_for('index_bl.conn_device'))
    else:
        return render_template('conndevice.html')


@index_bl.route('/configtag.html', methods=['GET','POST'])
def config_tag():
    return render_template('configtag.html')


